<?php
/**
 * 门票每日价格
 *
 * @copyright  Copyright (c) 2015-2025 NcPHP Inc. (http://www.ncphp.com)
 * @license    http://www.ncphp.com
 * @link       http://www.ncphp.com
 * @author	   NcPHP Team
 * @since      File available since Release v1.1
 */
defined('InNcPHP') or exit('Access Invalid!');

class ticket_dateModel extends Model{

	public function __construct(){
		parent::__construct('ticket_date');
	}

    /**
     * 获取列表分页
     * @param array $condition
     * @param string $field
     * @param int $page
     * @param string $order
     * @return mixed
     */
    public function getTicketDateListPage($condition = array(), $field = '*', $page = 0, $order = 'date desc'){
        return $this->field($field)->where($condition)->page($page)->order($order)->select();
    }

    /**
     * 获取一条记录的详细信息
     * @param array $condition
     * @param string $field
     * @return mixed
     */
	public function getTicketDateInfo($condition = array(), $field = '*')
    {
        return $this->field($field)->where($condition)->find();
    }

    /**
     * 插入记录
     * @param array $params
     * @return mixed
     */
    public function addTicketDate($params)
    {
        return $this->insert($params);
    }

    /**
     * 更新记录
     * @param array $condition
     * @param array $params
     * @return mixed
     */
    public function updateTicketDate($condition, $params)
    {
        return $this->where($condition)->update($params);
    }

    /**
     * 删除记录
     * @param array $condition
     * @return mixed
     */
    public function delTicketDate($condition){
        return $this->where($condition)->delete();
    }

    /**
     * 获取记录数组
     * @param array $condition
     * @param string $field
     * @param string $order
     * @return mixed
     */
    public function getTicketDateList($condition = array(), $field = '*', $order = 'date desc'){
	    return $this->field($field)->where($condition)->order($order)->select();
    }
}
?>